<?php

namespace backend\assets;

use yii\base\InvalidConfigException;
use yii\web\AssetBundle;

/**
 * Main backend application asset bundle.
 */
class EChartAsset extends AssetBundle
{
    public $sourcePath = '@app/themes/cza/assets';

    public $js = [
        // 'js/chart.js-3.2.0/package/dist/chart.min.js',
        // 'js/echarts5.min.js',
        // 'js/echarts.min.js',
        'https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js',
    ];

    public $publishOptions = [
        'forceCopy' => YII_DEBUG,
    ];

    public $jsOptions = [
        'position'=>\yii\web\View::POS_HEAD,
    ];

    public function init()
    {
        $this->sourcePath = '@app/themes/' . CZA_BACKEND_THEME . '/assets';
        parent::init();
    }

}
